home *** CD-ROM | disk | FTP | other *** search
/ Softwarová Záchrana 3 / Softwarova-zachrana-3.bin / Xteq X-Setup / xqdcXSP-Setup-EN.exe / {app} / plugins / XQ Control Panel Hide Disp.xpl < prev    next >
Text File  |  2001-07-12  |  3KB  |  92 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="6"
  3. "COUNT"="5"
  4. "UIPATH"="Appearance\Control Panel\Other Settings"
  5. "NAME"="Visible pages in "Display""
  6. "LANGUAGE"="VBScript"
  7. "VERSION"="1.50"
  8. "OSVERSION"="11101"
  9. "TEXT 1"="Show "Background" page in Display control"
  10. "TEXT 2"="Show "Screensaver" page in Display control"
  11. "TEXT 3"="Show "Appearance" page in Display control"
  12. "TEXT 4"="Show "Settings" page in Display control"
  13. "TEXT 5"="Show "ActiveDesktop" page in Display control "
  14. "DESCRIPTION 1"="To show a page inside the "Display" control, activate it. To hide it, deactivate it."
  15. "DESCRIPTION 2"="If all items are hidden, the "Display" control will not start."
  16. "AUTHOR"="Xteq Systems"
  17. "CONTACTURL"="http://www.xteq.com"
  18. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  19. "COMMENT 1"=""NoDispCpl" fix by Mikhail Medvedev [ursa@ukrpost.net]"
  20. "COMMENT 2"=" "
  21.  
  22.  
  23.  
  24. sPath="HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\"
  25. sPath2="HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\"
  26.  
  27. sBAK="NoDispBackgroundPage" 'all dword (1 = remove)
  28. sSCR="NoDispScrSavPage"
  29. sAPP="NoDispAppearancePage"
  30. sSET="NoDispSettingsPage"
  31. sACD="NoActiveDesktopChanges"
  32.  
  33. sNothing="NoDispCPL"
  34.  
  35. Sub Plugin_Initialize 
  36.     i=RegReadValue(sPath & sBAK)
  37.     if i<>1 then SetUIElement 1,true
  38.  
  39.     i=RegReadValue(sPath & sSCR)
  40.     if i<>1 then SetUIElement 2,true
  41.  
  42.     i=RegReadValue(sPath & sAPP)
  43.     if i<>1 then SetUIElement 3,true
  44.  
  45.     i=RegReadValue(sPath & sSET)
  46.     if i<>1 then SetUIElement 4,true
  47.  
  48.     i=RegReadValue(sPath2 & sACD)
  49.     if i<>1 then SetUIElement 5,true
  50. End Sub
  51.  
  52. Sub Plugin_CheckData(ElementIndex)
  53. End Sub
  54.  
  55. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  56.  Call WriteIt(1,sPath,sBAK)
  57.  Call WriteIt(2,sPath,sSCR)
  58.  Call WriteIt(3,sPath,sAPP)
  59.  Call WriteIt(4,sPath,sSET)
  60.  Call WriteIt(5,sPath2,sACD)
  61.  
  62.  'check if everything is turned off, and if so set NoDispCPL flag..
  63.  if GetUIElement(1)=false and GetUIElement(2)=false and GetUIElement(3)=false and GetUIElement(4)=false and GetUIElement(5)=false then
  64.     Call RegWriteValue(sPath & sNothing,1,2)
  65.  else
  66.     If RegValueExists(sPath & sNothing) then
  67.        Call RegDeleteValue(sPath & sNothing)  
  68.     end if
  69.  end if
  70.  
  71.  
  72.  Call IndicateSettingChange()
  73. End Sub
  74.  
  75. Sub WriteIt(ITM,PAT,VAL)
  76.  b=GetUIElement(ITM)
  77.  if b=false then
  78.     call RegWriteValue(PAT & VAL,1,2)
  79.  else
  80.     chk=RegReadValue(PAT & VAL)
  81.     if IsEmpty(chk)=false then
  82.        Call RegDeleteValue(PAT & VAL)
  83.     end if
  84.  end if
  85. end sub
  86.  
  87. Sub Plugin_Terminate 
  88. End Sub
  89.  
  90.  
  91.  
  92.